﻿using System;

namespace 可选参数与命名参数
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = 2;
            double b = 45;
            int c = 23;
            char d='a';
            //Sam(a, b, c, d);
            //Sam(a, b, c);
            //Sam(a, b, d: d);//命名参数file:///C:/Program%20Files%20(x86)/Thunder%20Network/Thunder/Program/resources/app/out/notification-renderer/index.html#
            
            Sam(a, b, d: 'c');//命名参数
            Console.WriteLine("{0},{1},{2},{3}", a, b, c, d);
        }
        static void Sam(int a,double b,int c=1,char d='r')
        {
            a = a + 1;
            b = a + c;
        }
    }
}
